package com.rakuten.api.mule.transformers;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import org.codehaus.jackson.map.ObjectMapper;
import org.mule.api.transformer.TransformerException;
import org.mule.config.i18n.MessageFactory;
import org.mule.transformer.AbstractMessageTransformer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.mule.transformer.types.DataTypeFactory;
import org.mule.api.MuleMessage;

import com.rakuten.api.mule.model.Price;
import com.rakuten.api.mule.model.Product;
import com.rakuten.api.mule.model.Variants;

public class ObjectToRequestUrl extends AbstractMessageTransformer{



    public Object transformMessage(MuleMessage message, String outputEncoding) 
    		throws TransformerException {
		
		String url = null;


    	try {
//    		Variants variant = message.getPayload(Variants.class);
//    		Price prices[] = variant.getPrices();
//    		url="?mallId="+prices[0].getMarketplaceIdentifier()+"&shopUrl="+prices[0].getShopURL();


    	} catch (Exception e) {                  
    		throw new TransformerException(this, e);
    	}
    	
    	return url;
    }
} 